home *** CD-ROM | disk | FTP | other *** search
/ Elite European Models 1 / Elite European Models 1.iso / pc / elite.dxr / 00117_Mouse Loc Check.ls < prev    next >
Encoding:
Text File  |  1996-05-06  |  1.8 KB  |  68 lines

  1. on idle
  2.   set theVLoc to the mouseV
  3.   set theHLoc to the mouseH
  4.   if (theHLoc < 30) and (theVLoc < 435) then
  5.     if the left of sprite 1 < 10 then
  6.       cursor(200)
  7.       set the castNum of sprite 3 to 14
  8.       set the locH of sprite 3 to theHLoc
  9.       set the locV of sprite 3 to theVLoc
  10.       if the visible of sprite 3 = 0 then
  11.         set the visible of sprite 3 to 1
  12.       end if
  13.       set the locH of sprite 1 to the locH of sprite 1 + 5
  14.     end if
  15.     updateStage()
  16.     exit
  17.   end if
  18.   if (theHLoc > 610) and (theVLoc < 435) then
  19.     if the right of sprite 1 > 629 then
  20.       cursor(200)
  21.       set the castNum of sprite 3 to 12
  22.       set the locH of sprite 3 to theHLoc
  23.       set the locV of sprite 3 to theVLoc
  24.       if the visible of sprite 3 = 0 then
  25.         set the visible of sprite 3 to 1
  26.       end if
  27.       set the locH of sprite 1 to the locH of sprite 1 - 5
  28.     end if
  29.     updateStage()
  30.     exit
  31.   end if
  32.   if theVLoc < 30 then
  33.     if the top of sprite 1 < 10 then
  34.       cursor(200)
  35.       set the castNum of sprite 3 to 11
  36.       set the locH of sprite 3 to theHLoc
  37.       set the locV of sprite 3 to theVLoc
  38.       if the visible of sprite 3 = 0 then
  39.         set the visible of sprite 3 to 1
  40.       end if
  41.       set the locV of sprite 1 to the locV of sprite 1 + 5
  42.     end if
  43.     updateStage()
  44.     exit
  45.   end if
  46.   if (theVLoc > 400) and (theVLoc < 435) then
  47.     if the bottom of sprite 1 > 424 then
  48.       cursor(200)
  49.       set the castNum of sprite 3 to 13
  50.       set the locH of sprite 3 to theHLoc
  51.       set the locV of sprite 3 to theVLoc
  52.       if the visible of sprite 3 = 0 then
  53.         set the visible of sprite 3 to 1
  54.       end if
  55.       set the locV of sprite 1 to the locV of sprite 1 - 5
  56.     end if
  57.     updateStage()
  58.     exit
  59.   end if
  60.   set the visible of sprite 3 to 0
  61.   cursor(-1)
  62. end
  63.  
  64. on exitFrame
  65.   set the visible of sprite 1 to 1
  66.   go(the frame)
  67. end
  68.